#include <stdio.h>
#include "CNNEngine.h"
#include "NNNetWork.h"
#include "Log.h"

int main()
{
    Log::OutputLog("CNNEngine main");
    CNNEngine m_CNNEngine;
    int inputImageSizeWidth = 28, inputImageSizeHeight = 28;
    int scaleImageSizeWidth = 29, scaleImageSizeHeight = 29;
    NNLayer* pLayer00 = new NNLayer("Layer00");
    NNLayer* pLayer01 = new NNLayer("Layer01", pLayer00);
    NNLayer* pLayer02 = new NNLayer("Layer02", pLayer01);
    NNLayer* pLayer03 = new NNLayer("Layer03", pLayer02);
    NNLayer* pLayer04 = new NNLayer("Layer04", pLayer03);
    m_CNNEngine.AddLayer(pLayer00);
    m_CNNEngine.AddLayer(pLayer01);
    m_CNNEngine.AddLayer(pLayer02);
    m_CNNEngine.AddLayer(pLayer03);
    m_CNNEngine.AddLayer(pLayer04);
    
    /********************************Layer00*************************************************/
    pLayer00->AddNeuron(scaleImageSizeWidth*scaleImageSizeHeight);
    /********************************Layer00*************************************************/

    
    
    
    
    
    /********************************Layer01**************************************************/
    pLayer01->AddNeuron(scaleImageSizeWidth*scaleImageSizeHeight);
    int kernel01[] = {
        1,  2,  3,  4,
        29, 30, 31, 32, 33,
        58, 59, 60, 61, 62,
        87, 88, 89, 90, 91,
        116,117,118,119,120 };
    int kernel01Width = 5;
    int kernel01Height = 5;
    pLayer01->setKernel(kernel01, kernel01Width, kernel01Height);
    pLayer01->AddWeight(scaleImageSizeWidth*scaleImageSizeHeight);
    /********************************Layer01*************************************************/
    
    
    
    
    
    
    /********************************Layer02*************************************************/
    pLayer02->AddNeuron(scaleImageSizeWidth*scaleImageSizeHeight);
    int kernel02[] = {
        0,  1,  2,  3,  4,
        13, 14, 15, 16, 17,
        26, 27, 28, 29, 30,
        39, 40, 41, 42, 43,
        52, 53, 54, 55, 56};
    int kernel02Width = 5;
    int kernel02Height = 5;
    pLayer02->setKernel(kernel02, kernel02Width, kernel02Height);
    pLayer02->AddWeight(scaleImageSizeWidth*scaleImageSizeHeight);
    /********************************Layer02*************************************************/
    
    
    
    
    
    /********************************Layer03*************************************************/
    pLayer03->AddNeuron(scaleImageSizeWidth*scaleImageSizeHeight);
    pLayer03->AddWeight(scaleImageSizeWidth*scaleImageSizeHeight);
    /********************************Layer03*************************************************/
    
    
    
    
    
    
    /********************************Layer04*************************************************/
    pLayer04->AddNeuron(scaleImageSizeWidth*scaleImageSizeHeight);
    pLayer04->AddWeight(scaleImageSizeWidth*scaleImageSizeHeight);
    /********************************Layer04*************************************************/
   
    
    return 0;
}

